home *** CD-ROM | disk | FTP | other *** search
/ SPACE 1 / SPACE - Library 1 - Volume 1.iso / program / 441 / vdisrc12 / vdiattr4.s < prev    next >
Text File  |  1990-11-23  |  2KB  |  64 lines

  1.  
  2. ;*========================================================================
  3. ;*
  4. ;* VDIFAST Public Domain VDI bindings.
  5. ;*
  6. ;*========================================================================
  7.  
  8.             .iif                !(^^macdef VContrl),.include  "vdimacro.s"
  9.                         
  10. ;*************************************************************************
  11. ;*
  12. ;* Attribute functions 4.
  13. ;*  A couple random rarely-used functions.
  14. ;*
  15. ;*  _vsf_udpat      - Set user-defined fill pattern.
  16. ;*  _vs_color       - Set color (rgb) value.
  17. ;*
  18. ;*************************************************************************
  19.  
  20. ;*------------------------------------------------------------------------
  21. ;* Set user-defined fill pattern. 
  22. ;*------------------------------------------------------------------------
  23.  
  24. _vsf_udpat::
  25.             .cargs    #8,.handle.w,.ppat.l,.planes.w
  26.             link      a6,#0
  27.             
  28.             move.w    .planes(a6),d0    ;* Length of intin array is number
  29.             lsl.w      #4,d0            ;* of planes * 16.
  30.             
  31.             VContrl   #112,,,d0
  32.             
  33.             lea       -12(sp),sp
  34.             move.l    .ppat(a6),-(sp)   ;* -> intin
  35.             pea       16(sp)            ;* -> contrl
  36.  
  37.             jmp       vdicall
  38.             
  39. ;*------------------------------------------------------------------------
  40. ;* Set color representation (set rgb values).
  41. ;*------------------------------------------------------------------------
  42.  
  43. _vs_color::
  44.             .cargs    #8,.handle.w,.index.w,.rgb.l
  45.             link      a6,#0
  46.             
  47.             move.l    .rgb(a6),a0       ;* Since the rgb values and the
  48.             move.w    4(a0),-(sp)       ;* index are supposed to be in the
  49.             move.w    2(a0),-(sp)       ;* intin array, we have to copy the
  50.             move.w    (a0),-(sp)        ;* rgb from the user array to the 
  51.             move.w    .index(a6),-(sp)  ;* stack, then put the index on the
  52.             move.l    sp,a0             ;* front.  Save a pointer to intin.
  53.             
  54.             VContrl   #14,,,#4
  55.             
  56.             lea       -12(sp),sp
  57.             move.l    a0,-(sp)          ;* -> intin
  58.             pea       16(sp)            ;* -> contrl
  59.  
  60.             jmp       vdicall
  61.             
  62. ; end of code
  63.  
  64.